<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"	              
      xmlns:t="http://myfaces.apache.org/tomahawk">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Login</title>
	
	<link rel="stylesheet" type="text/css" href="style/detailsUser.css" />
</head>
       <body>
       		<f:view>
       			<t:inputHidden value="#{user.isSigned}" />  
				<h:form id = "Login">
				<br></br><br></br><br></br>
       			<h1><t:outputText value ="#{messages.welcomeMessage}"/></h1>
			    <hr />
			        <center>
			             <h3><t:outputText value ="#{messages.signInMessage}"/></h3>
			            <t:panelGroup >
						<t:panelGrid columns="3">
		     			<t:outputLabel for="Username" value = "Username:"/> 
						<t:inputText id="Username" value="#{user.username}" required = "true">
							<f:validateLength minimum="4" maximum="15"/>
						</t:inputText>
						<h:message for="Username" style="color:red;margin:8px;"/>

						<t:outputLabel for="Password" value = "Password:"/> 
						<t:inputSecret id="Password" value="#{user.password}" required = "true"> 
							 <f:validateLength minimum="4" maximum="15" />
						</t:inputSecret>
						<h:message for="Password" style="color:red;margin:8px;"/>


		            	<t:commandButton id = "login" value="Sign in" action="#{user.signIn}"/>
		            	<h:messages globalOnly = "true" style="color:red;margin:8px;"/>
						</t:panelGrid>
				      </t:panelGroup>
		          </center>
		          </h:form>
          </f:view>
       </body>
      
</html>